home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’93 / SCSIPatch / dcmds / start_scsi_record.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-14  |  1.3 KB  |  55 lines  |  [TEXT/MPS ]

  1. /*
  2.     start_scsi_record.c
  3.         Copyright Paul Baxter
  4.  
  5.    The following MPW commands will build the dcmd and copy it to the
  6.    "Debugger Prefs" file in the System folder. The dcmd's name in
  7.    MacsBug will be the name of the file built by the Linker.
  8.  
  9.    You must have the following object files in the "{Libraries}" directory:
  10.    dcmdGlue.a.o DRuntime.o put.c.o 
  11.    You must also have the folowing header files in the "{CIncludes}" directory:
  12.    dcmd.h put.h
  13.  
  14.            C start_scsi_record.c
  15.         Link "{Libraries}"dcmdGlue.a.o start_scsi_record.c.o "{Libraries}"patchlib.a.o "{Libraries}"DRuntime.o  -o ScsiRecord
  16.         BuildDcmd ScsiRecord 101
  17.         Echo 'include "ScsiRecord";'    |    Rez -a -o "{systemFolder}Debugger Prefs"
  18.  */
  19.  
  20. #include <Types.h>
  21. #include <Errors.h>
  22. #include <dcmd.h>
  23. #include <Patch.h>
  24.  
  25.  
  26.  
  27. pascal void CommandEntry (dcmdBlock* paramPtr)
  28. {
  29.     OSErr err;
  30.     
  31.     switch (paramPtr->request)
  32.         {
  33.         case dcmdInit:
  34.             break;
  35.  
  36.         case dcmdHelp:
  37.             dcmdDrawLine ("\pScsiRecord");
  38.             dcmdDrawLine ("\p   Start Recording SCSI calls.");
  39.             break;
  40.  
  41.         case dcmdDoIt:
  42.             err = SCSISTARTRECORD();
  43.             if (err == unimpErr) {
  44.                 dcmdDrawLine ("\pSCSI Patch not Installed.");
  45.             }
  46.             else {
  47.                 dcmdDrawLine ("\pNow Recording SCSI calls.");
  48.                 if (err != 0) {
  49.                     dcmdDrawLine ("\pWarning Record Buffer Full.");
  50.                 }
  51.             }
  52.             break;
  53.         }
  54. } // CommandEntry
  55.